{% load static %}
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>LOGIN</title>
    <style>
        body {
            background-image: url({% static 'img/login.png' %});
            background-size: cover;
            background-position: center;
        }
    </style>
    <link rel="stylesheet" href="{% static 'css/login.css' %}">
</head>
<body>
<form method='POST' class="act" novalidate>
    {% csrf_token %}
    <div class="login-form">
        <label>用户名</label>
        {{ form.username }}
        <span style="color: red">{{ form.username.errors.0 }}</span>
        <label>密码</label>
        {{ form.password }}
        <span style="color: red">{{ form.password.errors.0 }}</span>

        <div id="captcha" class="form-group">
            <label for="id_code">图片验证码</label>
            <div class="row">
                <div class="col-xs-7">
                    {{ form.code }}
                    <span style="color: red">{{ form.code.errors.0 }}</span>
                </div>
                <div class="col-xs-5">
                    <img id='image_code' src="/image/code/">
                </div>
            </div>
        </div>
        <a href="#">没有账号？点此注册</a>
        <button name="submit">登录</button>
    </div>
</form>
</body>
</html>
